home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
prospero
/
propsero.lha
/
prospero-beta.4.2e
/
user
/
af.c
next >
Wrap
C/C++ Source or Header
|
1992-02-10
|
901b
|
50 lines
/*
* Copyright (c) 1989, 1990 by the University of Washington
*
* For copying and distribution information, please see the file
* <uw-copyright.h>.
*/
#include <uw-copyright.h>
#include <stdio.h>
#include <strings.h>
#include <pfs.h>
#include <perrno.h>
int perrno;
int pfs_debug = 0;
main(argc,argv)
int argc;
char *argv[];
{
int tmp;
argc--;argv++;
if ((argc > 0) && (strncmp(argv[0],"-D",2) == 0)) {
pfs_debug = 1; /* Default debug level */
sscanf(argv[0],"-D%d",&pfs_debug);
argc--;argv++;
}
if(argc < 2) {
fprintf(stderr,"Usage: af link filter [args]\n");
exit(1);
}
if(argc > 2) tmp = add_filter(argv[0],argv[1],argv[2]);
else tmp = add_filter(argv[0],argv[1],NULL);
if(tmp) {
fprintf(stderr,"%s",argv[0]);
perrmesg(" failed: ", tmp, NULL);
exit(1);
}
if(pwarn) pwarnmesg("WARNING: ",0,NULL);
exit(0);
}